home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
347_01
/
tavlsucc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-25
|
731b
|
34 lines
/*:file:version:date: "%n V.%v; %f"
* "TAVLSUCC.C V.8; 27-Apr-91,12:08:56"
*
* Module : tavl_succ()
* Purpose: Return a pointer to the in-order successor of
* the node "p"
*
* Released to the PUBLIC DOMAIN
*
* author: Bert C. Hughes
* 200 N.Saratoga
* St.Paul, MN 55104
* Compuserve 71211,577
*/
#include "tavltree.h"
#include "tavlpriv.h"
TAVL_nodeptr tavl_succ(TAVL_nodeptr p)
{
register TAVL_nodeptr q;
if (!p)
return NULL;
q = p->Rptr;
if (RLINK(p))
while (LLINK(q))
q = q->Lptr;
return (Is_Head(q) ? NULL : q);
}